package com.atguigu.gmall.product.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.atguigu.gmall.product.entity.BaseAttrValue;
import com.atguigu.gmall.product.service.BaseAttrValueService;
import com.atguigu.gmall.product.mapper.BaseAttrValueMapper;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author DELL
* @description 针对表【base_attr_value(属性值表)】的数据库操作Service实现
* @createDate 2022-11-29 22:54:35
*/
@Service
public class BaseAttrValueServiceImpl extends ServiceImpl<BaseAttrValueMapper, BaseAttrValue>
    implements BaseAttrValueService {
    /**
     * 根据平台属性 id  获取平台属性对象数据
     * @param attrId
     * @return
     */
    @Override
    public List<BaseAttrValue> getValueList(Long attrId) {
        //TODO 封装查询条件
        QueryWrapper<BaseAttrValue> queryWrapper =new QueryWrapper<>();
        queryWrapper.eq("attr_id",attrId);
        List<BaseAttrValue> baseAttrValues = list(queryWrapper);
        return baseAttrValues;
    }



}




